package edu.sctu.zhoumengxue.day201506.day20150602;

/**
 * Created by user12 on 2015/6/2.
 */
public class BagDeth {

    private String ban ;
    private PeopleAppbean peopleAppbean;
    /*构造函数*/
    public BagDeth(PeopleAppbean peopleAppbean, String ban){
        this.peopleAppbean = peopleAppbean;
        this.ban = ban;
    }
    /*检查包裹*/

    public boolean checkBag(){
        
        boolean has_Ban = false;
        if (peopleAppbean.isHas_bag(true)) {
            if(ban.contains(peopleAppbean.getBagname())){
                has_Ban = true;
            }
        }else {
            has_Ban = false;
        }
        return has_Ban;
    }
/*检查水*/
    public boolean checkWater(){
        boolean has_Ban = false;
        if(peopleAppbean.isHas_water(true)){
            if(ban.contains(peopleAppbean.getWatername())){
                has_Ban = true;
            }
        }else {
            has_Ban = false;
        }
        return has_Ban;
    }
}
